<div class="page">
  <?php print theme('header'); ?>

  <?php print render($page['navigation']); ?>

  <div class="page-wrapper">
    <?php print render($page['highlighted']); ?>

    <?php drupal_add_css(drupal_get_path('theme', 'nobel') . '/css/styles.css', array('group' => CSS_THEME)); ?>
    <style type="text/css">
      .form_control input {
        height: 37px;
        padding: 0 3%
      }

      select {
        background-color: #fff;
        background-position: right center;
        background-repeat: no-repeat;
        border: 1px solid #888;
        border-radius: 3px;
        box-sizing: border-box;
        font: 12px/1.5 Tahoma, Arial, sans-serif;
        height: 30px;
        padding: 0 4px;
      }
    </style>
    <?php $form = drupal_get_form('nobel_user_password_reset_form'); ?>
    <main id="content" role="main">

      <div class="container clearfix">
        <div class="top-notification"></div>
        <div class="main col1-layout no-title">
          <div class="col-main">
            <div class="col-main-wrap">
              <div class="page-title mod mod-headline">
                <h1 class="b">重置密码</h1>
                <h5 class="b"></h5>
              </div>

              <!-- registered customers -->
              <div class="rows clearfix">
                <?php
                $messages = drupal_get_messages();
//                var_dump($messages);exit;
                ?>
                <?php if (!empty($messages['status'][0])): ?>
                  <div class="message">
                    <?= $messages['status'][0] ?>
                  </div>
                <?php endif; ?>
                <div class="pull-left login-l col_5 col_12-xs">
                  <div class="required-block"><p class="required">* 必填字段</p></div>
                  <form class="b" method="<?= $form['#method'] ?>" id="<?= $form['#id'] ?>" action="<?= $form['#action'] ?>" novalidate="novalidate">
                    <?= drupal_render($form['form_build_id']) ?>
                    <?= drupal_render($form['form_id']) ?>
                    <?= drupal_render($form['form_token']) ?>
                    <ul class="form-list">

                      <li class="form_control">
                        <label for="password" class="required">密码 *</label>
                        <div class="input-box">
                          <input class="required input-text" value="<?= $form['account']['pass']['#value']['pass1'] ?>" type="password" id="edit-pass-pass1"
                                 name="pass[pass1]">
                        </div>
                        <?php if (!empty(form_get_errors()['pass1'])) { ?><span id="edit-name-error" class="error"><?= form_get_errors()['pass1'] ?></span><?php } ?>
                      </li>
                      <li class="form_control">
                        <label for="confirmPassword" class="required">确认密码 *</label>
                        <div class="input-box">
                          <input class="required input-text" value="<?= $form['account']['pass']['#value']['pass2'] ?>" type="password" id="edit-pass-pass2"
                                 name="pass[pass2]">
                        </div>
                      </li>

                      <li class="form_control">
                        <div class="buttons-set form-buttons btn-only">
                          <button type="submit" class="button colored" name="send" id="send2">
                            <span>重置</span>
                          </button>
                        </div>
                      </li>

                    </ul>
                  </form>
                  <!-- end registered customers -->
                </div>
                <div class="pull-right login-r col_5 col_12-xs">
                  <div class="pad-left-40 m-static-block">
                    <h3 class="b mrg-btm-10">已经有帐号了？</h3>
                    <p><a class="button button2"
                          href="<?= !empty($_GET['destination']) && drupal_valid_path($_GET['destination']) && $_GET['destination'] != 'user/login' && $_GET['destination'] != 'user/login' ? url('user/login', array('query' => array('destination' => $_GET['destination']))) : url('user/login') ?>">立即登录</a>
                    </p>
                  </div>
                </div>
              </div>

            </div>
          </div>
        </div>
      </div>
    </main>


    <?php print theme('footer', ['bottom' => $page['bottom'], 'footer_block_2' => ['block_2' => $page['footer']['block_2']]]); ?>
  </div>

</div>